﻿Public Class HoraireOverview


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim oHoraire As New HoraireEmploye
        Dim oContext As New DBMainContext

        oHoraire.dtpDate.Value = mcDate.SelectionRange.Start
        oHoraire.initialise(oContext)
        'oHoraire.SchedulerMain.Initialize(96, 15, oContext, oHoraire.dtpDate.Value)
        MainForm.AddTabToTC("Planification: " + mcDate.SelectionRange.Start, True, oHoraire)

    End Sub

    Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles btnActivite.Click

        Dim oListActivite As New ListeActivite(PlanificationEvenement.TypeEvenement.Activite)
        MainForm.AddTabToTC("Liste des Activités", True, oListActivite)


    End Sub

    Private Sub HoraireOverview_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Dim lstHoraire As List(Of Horaire) = (From u In (New DBMainContext).Horaire Select u).ToList
        Dim lstDate As New List(Of Date)

        For Each oDate As Date In (From u In lstHoraire Select u.Date).ToList
            lstDate.Add(oDate)
        Next
        mcDate.BoldedDates = lstDate.ToArray



    End Sub
End Class
